We use the normal Euclidean notions of points, lines, planes, length, angles and so on.
By choosing an (arbitrary) origin point \(O\), we may write positions as position vectors with respect to that origin point.

\subsection{Vector addition and scalar multiplication}
We define vector addition using the shape of a parallelogram with points \(\vb 0, \vb a, \vb a + \vb b, \vb b\).
We define scalar multiplication of a vector using the line \(\overrightarrow{OA}\) and setting the length to be multiplied by the constant.
Note that this vector space is an abelian group under addition.
\begin{definition}
	\(\vb a\) and \(\vb b\) are defined to be parallel if and only if \(\vb a = \lambda \vb b\) or \(\vb b = \lambda \vb a\) for some \(\lambda \in \mathbb R\).
	This is denoted \(\vb a \parallel \vb b\).
	Note that the vectors may be zero, in particular the zero vector is parallel to all vectors.
\end{definition}
\begin{definition}
	The span of a set of vectors is defined as \(\vecspan \{\vb a, \vb b, \cdots, \vb c\} = \{ \alpha \vb a + \beta \vb b + \cdots + \gamma \vb c: \alpha, \beta, \gamma \in \mathbb R \}\).
	This is the line/plane/volume etc.
	containing the vectors.
	The span has an amount of dimensions at most equal to the amount of vectors in the input set.
	For example, the span of a set of two vectors may be a point, line or plane containing the vectors.
\end{definition}

\subsection{Scalar product}
\begin{definition}
	Given two vectors \(\vb a, \vb b\), let \(\theta\) be the angle between the two vectors.
	Then, we define
	\[
		\vb a \cdot \vb b = \abs{\vb a} \abs{\vb b} \cos \theta
	\]
	Note that if either of the vectors is zero, \(\theta\) is undefined.
	However, the dot product is zero anyway here, so this is irrelevant.
\end{definition}
\begin{definition}
	Two vectors \(\vb a\) and \(\vb b\) are defined to be parallel (or orthogonal) if and only if \(\vb a \cdot \vb b = 0\).
	This is denoted \(\vb a \perp \vb b\).
	This is true in two cases:
	\begin{enumerate}
		\item \(\cos \theta = 0 \iff \theta = \frac{\pi}{2} \mod \pi\), or
		\item \(\vb a = 0\) or \(\vb b = 0\).
	\end{enumerate}
	Therefore, the zero vector is perpendicular to all vectors.
\end{definition}
\begin{definition}
	We can decompose a vector \(\vb b\) into components relative to \(\vb a\):
	\[
		\vb b = \vb b_\parallel + \vb b_\perp
	\]
	where \(\vb b_\parallel\) is the component of \(\vb b\) parallel to \(\vb a\), and \(\vb b_\perp\) is the component of \(\vb b\) perpendicular to \(\vb a\).
	In particular, we have that
	\[
		\vb a \cdot \vb b = \vb a \cdot \vb b_\parallel
	\]
\end{definition}

\subsection{Vector product}
\begin{definition}
	Given two vectors \(\vb a, \vb b\), let \(\theta\) be the angle between the two vectors measured with respect to an arbitrary normal \(\vb{\hat n}\).
	Then, we define
	\[
		\vb a \wedge \vb b = \vb a \times \vb b = \abs{\vb a} \abs{\vb b} \vb{\hat n} \sin \theta
	\]
	Note that by swapping the sign of \(\vb{\hat n}\), \(\theta\) changes to \(2 \pi - \theta\), leaving the result unchanged.
	There are two degenerate cases:
	\begin{itemize}
		\item \(\theta\) is undefined if \(\vb a\) or \(\vb b\) is the zero vector, but the result is zero anyway because we multiply by the magnitudes of both vectors.
		\item \(\vb{\hat n}\) is undefined if \(\vb a \parallel \vb b\), but here \(\sin \theta = 0\) so the result is zero anyway.
	\end{itemize}
\end{definition}
We can provide several useful interpretations of the cross product:
\begin{itemize}
	\item The magnitude of \(\vb a \times \vb b\) is the vector area of the parallelogram defined by the points \(\vb 0, \vb a, \vb a + \vb b, \vb b\).
	\item By fixing a vector \(\vb a\), we can consider the plane perpendicular to it.
	      If \(\vb x\) is another vector in the plane, \(\vb x \mapsto \vb a \times \vb x\) rotates \(\vb x\) by \(\frac{\pi}{2}\) in the plane, scaling it by the magnitude of \(\vb a\).
\end{itemize}
Note that by resolving a vector \(\vb b\) perpendicular to another vector \(\vb a\), we have that
\[
	\vb a \times \vb b = \vb a \times \vb b_\perp
\]
A final useful property of the cross product is that since the result is perpendicular to both input vectors, we have
\[
	\vb a \cdot (\vb a \times \vb b) = \vb b \cdot(\vb a \times \vb b) = 0
\]

\subsection{Basis vectors}
To represent vectors as some collection of numbers, we can choose some basis vectors \(\vb e_1, \vb e_2, \vb e_3\) which are `orthonormal', i.e.\ they are unit vectors and pairwise orthogonal.
Note that
\[
	\vb e_i \cdot \vb e_j = \begin{cases}
		1 & \text{if } i = j \\
		0 & \text{otherwise}
	\end{cases}
\]
The set \(\{ \vb e_1, \vb e_2, \vb e_3 \}\) is called a basis because any vector can be written uniquely as a linear combination of the basis vectors.
Because we have orthonormal basis vectors, we can reduce this to
\[
	\vb a = \sum_i \vb a_i \vb e_i \implies \vb a_i = \vb e_i \cdot \vb a
\]
By representing a vector as a linear combination of basis vectors, it is very easy to evaluate the scalar product algebraically.
To calculate the vector product, we first need to define whether \(\vb e_1 \times \vb e_2 = \vb e_3\) or \(-\vb e_3\).
By convention, we assume that the basis vectors are right-handed, i.e.\ \(\vb e_1 \times \vb e_2 = \vb e_3\).
Then we can calculate the formula for the cross product in terms of the vectors' components.

\subsection{Scalar triple product}
The scalar triple product is the scalar product of one vector with the cross product of two more.
\[
	\vb a \cdot (\vb b \times \vb c) = \vb b \cdot (\vb c \times \vb a) = \vb c \cdot (\vb a \times \vb b) = [\vb a, \vb b, \vb c]
\]
The result of the scalar triple product is the signed volume of the parallelepiped starting at the origin with axes \(\vb a\), \(\vb b\), \(\vb c\).
We can represent this triple product as the determinant of a matrix:
\[
	\vb a \cdot (\vb b \times \vb c) =
	\begin{vmatrix}
		\vb a_1 & \vb a_2 & \vb a_3 \\
		\vb b_1 & \vb b_2 & \vb b_3 \\
		\vb c_1 & \vb c_2 & \vb c_3
	\end{vmatrix}
\]
If the scalar triple product is greater than zero, then \(\vb a, \vb b, \vb c\) is called a right handed set.
If it is equal to zero, then the vectors are all coplanar: \(\vb c \in \vecspan \{ \vb a, \vb b \}\).

\subsection{Vector triple product}
The vector triple product is the cross product of three vectors.
Note that this is non-associative.
The proof is covered in the subsequent lecture.
\[
	\vb a \times (\vb b \times \vb c) = (\vb a \cdot \vb c) \vb b - (\vb a\cdot \vb b) \vb c
\]
\[
	(\vb a \times \vb b) \times \vb c = (\vb a \cdot \vb c) \vb b - (\vb b\cdot \vb c) \vb a
\]

\subsection{Lines}
A line through \(\vb a\) parallel to \(\vb u\) is defined by
\[
	\vb r = \vb a + \lambda \vb u
\]
where \(\lambda\) is some real parameter.
We can eliminate lambda by using the cross product with \(\vb u\).
This will allow us to get a \(\vb u \times \vb u\) term which will cancel to zero.
\[
	\vb u \times \vb r = \vb u \times \vb a
\]
Informally, this is saying that \(\vb r\) and \(\vb a\) have the same components perpendicular to \(\vb u\).
Note that we can also reverse this process.
Consider the equation
\[
	\vb u \times \vb r = \vb c
\]
By using the dot product with \(\vb u\) we can say
\[
	\vb u \cdot (\vb u \times \vb r) = \vb u \cdot \vb c
\]
If \(\vb u \cdot \vb c \neq 0\) then the equation is inconsistent.
Otherwise, we can suppose that maybe \(\vb r = \vb u \times \vb c\) and use the formula for the vector product to get the left hand side to be \(\vb u \times (\vb u \times \vb c) = -\abs{\vb u}^2 \vb c\).
Therefore, by inspection, \(\vb a = -\frac{1}{\abs{\vb u}^2}(\vb u \times \vb c)\) is a solution.
Now, note that we can add any multiple of \(\vb u\) to \(\vb a\) and it remains a solution.
So the general solution is \(\vb r = \vb a + \lambda\vb u\).

\subsection{Planes}
The general point on a plane that passes through \(\vb a\) and has directions \(\vb u\) and \(\vb v\) is
\[
	\vb r = \vb a + \lambda \vb u + \mu \vb v
\]
where \(\vb u\) and \(\vb v\) are not parallel, and \(\lambda\) and \(\mu\) are real parameters.
We can do a dot product with \(\vb n = (\vb u \times \vb v)\) to eliminate both parameters.
\[
	\vb n \cdot \vb r = \kappa
\]
where \(\kappa = \vb n \cdot \vb a\).
Note that \(\abs{\kappa}/\abs{\vb n}\) is the perpendicular distance from the origin to the plane.

\subsection{Other vector equations}
The equation of a sphere is given by a quadratic vector equation in \(\vb r\).
\[
	\vb r^2 + \vb r \cdot \vb a = k
\]
We can complete the square to give
\[
	\left(\vb r + \frac 1 2 \vb a \right)^2 = \frac 1 4 \vb a^2 + k
\]
which is clearly a sphere with centre \(-\frac 1 2 \vb a\) and radius \(\left( \frac 1 4 \vb a^2 + k \right)^{1/2}\).

Another example of a vector equation is
\[
	\vb r + \vb a \times (\vb b \times \vb r) = \vb c \tag{1}
\]
where \(\vb a, \vb b, \vb c\) are fixed.
We can dot with \(\vb a\) to eliminate the second term:
\[
	\vb a \cdot \vb r = \vb a \cdot \vb c \tag{2}
\]
Note that using the dot product loses information---this is simply a tool to make deductions; (2) does not contain the full information of (1).
Combining (1) and (2), and using the formula for the vector triple product, we get
\begin{align*}
	\vb r + (\vb a \cdot \vb r) \vb b - (\vb a \cdot \vb b) \vb r          & = \vb c \tag{3} \\
	\implies \vb r + (\vb a \cdot \vb c) \vb b - (\vb a \cdot \vb b) \vb r & = \vb c
\end{align*}
This eliminates the dependency on \(\vb r\) inside the dot product.
Now, we can factorise, leaving
\[
	(1 - \vb a \cdot \vb b) \vb r = \vb c - (\vb a \cdot \vb c) \vb b \tag{4}
\]
If \(1 - \vb a \cdot \vb b \neq 0\) then \(\vb r\) has a single solution, a point.
Otherwise, the right hand side must also be zero (otherwise the equation is inconsistent).
Therefore, \(\vb c - (\vb a \cdot \vb c)\vb b = \vb 0\).
We can now combine this expression for \(\vb c\) into (3), eliminating the \((1- \vb a \cdot \vb b)\) term, to get
\[
	(\vb a \cdot \vb r - \vb a \cdot \vb c) \vb b = \vb 0
\]
This shows us that (given that \(\vb b\) is nonzero) the solutions to the equation are given by (2), which is the equation of a plane.
